<template>
    <div>
        <header-view></header-view>
        <div class="login-wrap">
            <el-breadcrumb separator="/"
                           style="font-size: 24px;margin-left: 12px;margin-bottom: 10px; padding-top: 15px">
                <el-breadcrumb-item>
                    <i class="el-icon-lx-cascades"></i> 康复训练分类配置
                </el-breadcrumb-item>
            </el-breadcrumb>
            <div class="container">
                <el-button type="primary" icon="el-icon-d-arrow-left" @click="handleReturn"
                           style="margin-bottom: 18px;">返回上一层
                </el-button>

                <el-table
                        :data="tableData"
                        style="width: 100%"
                        row-key="gameId"
                        class="table"
                        border
                        lazy
                        :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
                >
                    <el-table-column prop="gameId" label="游戏ID" width="200" align="center"></el-table-column>
                    <el-table-column prop="gameName" label="游戏名称" align="center"></el-table-column>
<!--                    <el-table-column prop="gameIcon" label="图片地址" align="center"></el-table-column>-->
                    <el-table-column prop="gamePath" label="游戏地址" align="center"></el-table-column>
                    <el-table-column prop="createdTime" label="创建时间" align="center"></el-table-column>
                    <el-table-column prop="updatedTime" label="更新时间" align="center"></el-table-column>
                </el-table>
            </div>
        </div>
     <!--弹出框-->

    </div>
</template>

<script>
    import {menuData,} from '../../../api/hospital/menu';

    export default {
        name: 'user',
        data() {
            return {
                tableData: [],
            };
        },
        created() {
            this.getData();
        },
        methods: {
            // 获取后台数据
            getData() {
                menuData(this.query).then(res => {
                    if (res.success == true) {
                        this.tableData = res.data;
                    } else {
                        this.$message.error("查询失败！");
                        this.tableData = [];
                    }
                });
            },
            /*返回上一层 主页*/
            handleReturn() {
                this.$router.push('/manage');
            },
        }
    };
</script>

<style scoped>
    .login-wrap {
        position: relative;
        width: 100%;
        height: 1000px;
        background-color: rgba(130, 149, 147, 0.59);
    }

    .header .logo {
        float: left;
        width: 400px;
        line-height: 50px;
        margin-top: 15px;
    }

    .btn-bell .el-icon-bell {
        color: #fff;
    }

    cascader {
        margin-left: 10px;
    }

    .user-avator img {
        display: block;
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    .header-avator img {
        display: block;
        width: 40px;
        height: 40px;
        border-radius: 50%;
    }

    .table {
        width: 100%;
        font-size: 14px;
    }
</style>
